<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        const p1 = new Promise( (resolve , reject) => {

        } )
        console.log('p1:',p1)  // pending


        const p2 = new Promise( (resolve , reject) => {
            setTimeout( () => {
                resolve()
            } )
        } )
        console.log('p2:',p2) // pending
        setTimeout( () => console.log('p2-setTimeout:',p2) )  // fulfilled


        const p3 = new Promise( (resolve , reject) => {
            setTimeout( () => {
                reject()
            } )
        } )
        console.log('p3:',p3) // pending
        setTimeout( () => console.log('p3-setTimeout:',p3) )  // rejected
    </script>
</body>
</html>